/**
 * @file   test_logic_analyzer002.c
 * @brief  Testing with Logic analyzer: Test to verify that BRR is scheduled after Periodic
 * Expected result: 1000...1000...
 */
#include "../header/common.h"
#include "../header/os.h"
#include "../header/uart.h"
#include "../header/trace.h"

#ifdef test_logic_analyzer002

const unsigned char PPP[] = {1,2};
const unsigned int PT = sizeof(PPP)/2;
EVENT* print_event;
extern uint16_t trace_counter;

void generic_task1(void)
{
    for(;;)
    {
		PORTD |= _BV(PORTD7);
    	//PORTD &= 0x00;
    	Task_Next();
    }
}

void generic_task2(void)
{
    for(;;)
    {
		//PORTD |= _BV(PORTD6);
    	PORTD &= 0x00;
    	Task_Next();
    }
}

int main(void) {
	DDRD = (1<<PORTD4) | (1<<PORTD5) | (1<<PORTD6) | (1<<PORTD7);

    Task_Create(generic_task1,1, PERIODIC,1);
    Task_Create(generic_task2, 0, BRR, 1);

    return 0;
}

#endif
